<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        /* 清除内外边距 */
        * {
            margin: 0;
            padding: 0;
        }
        .top,.banner,.main,.footer{
            width: 960px;
            margin: 0 auto;
            text-align: center;
            margin-bottom: 10px;
            background-color: pink;
            height: 80px;
            
        }
        .banner{
            height: 80px;
            background-color: purple;
        }
        .main{
            height: 500px;
            background-color: red;
        }
        .footer{
            height: 150px;
            background-color: green;
        }
        .main>.left{
            width: 480px;
            height: 500px;
            background-color: yellow;
            float: left;
        }
        .main>.right{
            width: 472px;
            height: 500px;
            background-color: blue;
            float: right;
        }
    </style>
</head>

<body>
    <div class="top">top</div>
    <div class="banner">banner</div>
    <div class="main">
        <div class="left"></div>
        <div class="right"></div>
    </div>
    <div class="footer">footer</div>
</body>

</html>